import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/base',
  component: Layout,
  redirect: '/base/driver_list',
  name: 'base',
  meta: {
    title: '基础管理',
    i18n: 'route.breadcrumb.root',
    icon: 'base',
  },
  children: [
    {
      path: 'driver_list',
      name: 'driver_list',
      component: () => import('@/views/base/driver_index.vue'),
      meta: {
        title: '司机信息',
      },
    },
    {
      path: 'car_list',
      name: 'car_list',
      component: () => import('@/views/base/car_index.vue'),
      meta: {
        title: '车辆信息',
      },
    }, {
      path: 'route_list',
      name: 'route_list',
      component: () => import('@/views/base/route_index.vue'),
      meta: {
        title: '线路信息',
      },
    }, {
      path: 'carrier_list',
      name: 'carrier_list',
      component: () => import('@/views/base/carrier_index.vue'),
      meta: {
        title: '承运商信息',
      },
    }, {
      path: 'trustee_list',
      name: 'trustee_list',
      component: () => import('@/views/base/trustee_index.vue'),
      meta: {
        title: '委托人信息',
      },
    }, {
      path: 'merchant_list',
      name: 'merchant_list',
      component: () => import('@/views/base/merchant_index.vue'),
      meta: {
        title: '客商信息',
      },
    },
    // {
    //   path: 'product_list',
    //   name: 'product_list',
    //   component: () => import('@/views/base/product_index.vue'),
    //   meta: {
    //     title: '商品信息',
    //   },
    // },
  ],
}

export default routes
